package com.realtyManage.springboot.Service.impl;

import com.realtyManage.springboot.Dao.HulkTypeRepository;
import com.realtyManage.springboot.Model.Do.HulkType;
import com.realtyManage.springboot.Service.IHulkTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

/**
 * HulkTypeServiceImpl
 *
 * @Author 杭州素色网络科技有限公司
 * @Date 2019/7/5
 **/
@Service
@Transactional
public class HulkTypeServiceImpl implements IHulkTypeService {
    @Autowired
    private HulkTypeRepository hulkTypeRepository;


    @Override
    public List<HulkType> findAll() {
        return hulkTypeRepository.findAll();
    }

    @Override
    public HulkType save(HulkType hulkType) {
        return hulkTypeRepository.save(hulkType);
    }

    @Override
    public void delete(Integer id) {
        hulkTypeRepository.deleteById(id);
    }
}
